import os, sys
from random import randint, choice
from math import sin, cos, radians

import pygame
from pygame import Rect, Color
from pygame.sprite import Sprite

from vec2d import vec2d


class Paddle(Sprite):
    
    __init__(self, canvas, WIDTH, HEIGHT, x, y, z):
        self.WIDTH = WIDTH
        self.HEIGHT = HEIGHT
        self.x = x
        self.y = y
        self.z = z
        self.pos = (x,y)
        self.canvas = canvas;
        
        Sprite.__init__(self);
        
        self.base_image = paddle_image
        self.image = self.base_image
        
        self.canvas.blit(self, pos)
        
        
    update(self):
        self.canvas.blit(background, pos, self.get_rect()) # erase the paddle
        
        # the cursor is not the center of the paddle
        # let us change this later
        self.pos = pygame.mouse.get_pos
          
        self.x = pos[0]
        self.y = pos[1]
        self.canvas.blit(self, pos)                      # draw the paddle
        

    
